﻿using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Maticsoft.Common;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (string.IsNullOrEmpty(Session["UserName"].ToString()))
            {
                Response.Redirect("login.aspx");
            }

            if ((bool)Session["业务管理"] == false && (bool)Session["客户管理"] == false && (bool)Session["费用结算"] == false && (bool)Session["统计分析"] == false && (bool)Session["客户互动"] == false && (bool)Session["知识分享"] == false && (bool)Session["基础资料设置"] == false && (bool)Session["系统管理"] == false)
            {
                Response.Write("<script>alert('您没有任何权限，请管理员为您添加权限后再登陆！')</script>");
                Response.Write("<script>window.document.location.href='login.aspx'</script>");

            }
        }
        catch
        {
            Response.Redirect("login.aspx");
        }
    }
    

}
